package string;

public class StringDemo {
    public static void main(String[] args) {
        /*
        String s="123abc";
        String s1="123"+"abc";
        System.out.println(s==s1);
        String s2="123";
        String s3="abc";
        String s4=s2+"abc";
        System.out.println(s==s4);
         */
        String s=new String("hello");
        String s1="hello";
        System.out.println(s==s1);//判断地址
        System.out.println(s.equals(s1));//判断内容

    }
}
